import http from '@/plugins/axios/index.js';

// 用户基本信息
export const pcUserInfo = (params) => {
  return http(`/yjz-user/lawtrain/pcUserInfo/selectUserInfoByUserId.do`, params, {
    method: 'GET'
  }).then((res) => res);
};



// 个人中心查询我的课程
export const userLessonByPage = (params) => {
  return http(`/lt-order/select_user_lesson_byPage.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 个人中心查询收藏课程
export const collectLessonByPage = (params) => {
  return http(`/lt-order/select_collect_lesson_byPage.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 是否收藏课程
export const hasCollectLesson = (params) => {
  return http(`/lt-order/collect_lesson.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 讲师信息查询
export const getLecturer = (params) => {
  return http(`/yjz-user/select_Lecturer_info.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 教师统计信息
export const getLecturerCenter = (params) => {
  return http(`/lt-order/sum_lecturer_center.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 教师相关课程查询
export const getAboutLesson = (params) => {
  return http(`/lt-order/lecturer_see_byPage.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 课程统计列表查询
export const getLecturerCenterByPage = (params) => {
  return http(`/lt-order/lecturer_center_byPage.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 查看收藏和获赞的数量
export const getLikeAndCoolect = (params) => {
  return http(`/lt-order/query_like_and_coolect.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 订阅服务
export const selectAllSubscribe = (params) => {
  return http(`/lt-order/subscribe/selectAllSubscribe.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 我的订阅服务
export const selectMySubscribe = (params) => {
  return http(`/lt-order/subscribe/selectMySubscribe.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 下单接口
export const addOrder = (params) => {
  return http(`/lt-order/addOrder.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 查询单个学习记录
export const newStudyLesson = (params) => {
  return http(`/lt-order/query_new_study_lesson.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 查询订单中心
export const querySelfOrder = (params) => {
  return http(`/lt-order/query_self_order_by_page.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 删除未支付的订单
export const deleteOrder = (params) => {
  return http(`/lt-order/delete_pc_order_by_id.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

// 查询消息通知
export const notification = (params) => {
  return http(`/lt-order/pc_query_notification_by_page.do`, params, {
    method: 'POST'
  }).then((res) => res);
};

// 单个消息已读
export const readOneNotification = (params) => {
  return http(`/lt-order/read_one_notification.do`, params, {
    method: 'GET'
  }).then((res) => res);
};

//判断是否是VIP用户
export const isVipInfo = (params) => {
  return http(`/lt-order/quert_user_is_vip`, params, {
    method: 'GET'
  }).then((res) => res);
};